Repository navigation
Conversation
A Pocket ID ID token has the client ID as its aud, so the server took it as an access token. It has the claim type=id-token, and the access token has no type claim.
The header needs a CORS preflight. Pocket ID allows only Authorization, so the token request of Swagger UI failed there.
The AppHost seeds Pocket ID through its admin API in a health check, so the BFF and the server wait for the seed. Each start creates or updates the groups, the test users with the Keycloak IDs, and the client, and prints a login link for each test user.
The tests sign in with a login code from the admin API. The back-channel test disables the user, which makes Pocket ID send the logout token.
…tead of a null-forgiving operator
…et ID in publish mode, and drop restating comments
…re the Swagger interceptor runs
Owner
Author
|
review-gate: passed 7ac0895 No high or medium finding. The low findings that stay open, with reasons:
Fixed after the review: L3 (publish-mode guard) in 63b2f8c, and nit 3 (Swagger interceptor comment) in d70854f. Nits 1 and 2 (TS casts, the Pocket ID-only shape of IdpLoginCode) stay as they are. The file already uses that style. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Add Pocket ID v2.19.3 as one more local OIDC provider.
AuthProvider=PocketIdstarts it in Docker, seeds it with no manual steps, and the e2e auth flows run against it. Draft: do not merge yet. See the open decisions.What changed
PocketIdAuthProvideradds thepocketidcontainer (port 24790).PocketIdSeederruns as its health check and brings the admin API to the seed state: groups, two test users with the Keycloak and ZeroFactor IDs, and theaspire-appclient with a fixed secret. Each step reads the current state and then creates or updates, so a kept volume converges. The BFF and the server wait for the check.pocketidconsole log, and the command "Print login links" prints new ones.type: id-token) as an access token. Before, it answered 200.X-Requested-Withfrom its token request. Pocket ID CORS allows onlyAuthorization.Tradeoffs
wgetcannot send PUT.DISABLE_RATE_LIMITING=true, because the e2e run hit a 429 after five login codes. The AppHost refuses Pocket ID in publish mode.Open decisions for later
sub,client_id, and the scopes, and no setting adds email or name. A fix needs the server to get the profile from somewhere else, for example userinfo. That logic is not in this PR, so that the template does not grow for one provider.subclient-aspire-app, so the server takes it as a user of the first-party client. Keycloak blocks this withserviceAccountsEnabled: false. Fix by refusingsubclient-{client_id}, or document it.AuthProviderCatalogTestsskips each provider with noseed/folder (L4). Exempt only Pocket ID instead.Verification
dotnet buildhas 0 warnings. The .NET tests,pnpm lint, andpnpm buildpass.AuthProvider=PocketId --isolated:pnpm test:e2e:stackgave 10 passed, 4 skipped. With--repeat-each=3: 30 passed, 12 skipped, 0 flaky. The skips are DPoP, and the three refresh-rotation tests (Pocket ID accepts the old refresh token for 60 s).